# __init__.py 初始化文件创建Flask应用
from flask_sqlalchemy import SQLAlchemy
from .exts import  init_exts
from flask import Flask
from . import *
from .views import blus

def create_app():
    app = Flask(__name__)
    # 注册蓝图
    app.register_blueprint(blueprint=blus)

    app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///sqlite3.db'
    app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = False
    # 初始化插件
    init_exts(app=app)

    return  app